package com.woniu.controller;

import com.woniu.Result;
import com.woniu.mqwork.AuditProduct;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/audit")
@Api(tags = "审核管理")
public class AuditController {
    @Autowired
    private AuditProduct auditProduct;

    @GetMapping("/{userId}")
    public Result<String> audit(@PathVariable Integer userId){
        auditProduct.sendMessage(userId);
        return Result.ok();
    }
}
